Optimal. Leaf size=107 \[ -\frac {8 \sqrt [4]{-1} a^3 \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}-\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+i a^3 \tan (e+f x)\right )}{3 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3637, 3673,
3614, 211} \begin {gather*} -\frac {8 \sqrt [4]{-1} a^3 \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}-\frac {2 \left (a^3+i a^3 \tan (e+f x)\right ) \sqrt {d \tan (e+f x)}}{3 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3614
Rule 3637
Rule 3673
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^3}{\sqrt {d \tan (e+f x)}} \, dx &=-\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+i a^3 \tan (e+f x)\right )}{3 d f}+\frac {(2 a) \int \frac {(a+i a \tan (e+f x)) (2 a d+4 i a d \tan (e+f x))}{\sqrt {d \tan (e+f x)}} \, dx}{3 d}\\ &=-\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}-\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+i a^3 \tan (e+f x)\right )}{3 d f}+\frac {(2 a) \int \frac {6 a^2 d+6 i a^2 d \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{3 d}\\ &=-\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}-\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+i a^3 \tan (e+f x)\right )}{3 d f}+\frac {\left (48 a^5 d\right ) \text {Subst}\left (\int \frac {1}{6 a^2 d^2-6 i a^2 d x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {8 \sqrt [4]{-1} a^3 \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {d} f}-\frac {16 a^3 \sqrt {d \tan (e+f x)}}{3 d f}-\frac {2 \sqrt {d \tan (e+f x)} \left (a^3+i a^3 \tan (e+f x)\right )}{3 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.59, size = 154, normalized size = 1.44 \begin {gather*} -\frac {2 a^3 e^{-3 i (e+f x)} (\cos (3 (e+f x))+i \sin (3 (e+f x))) \left (-12 \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right )+(9+i \tan (e+f x)) \sqrt {i \tan (e+f x)}\right ) \sqrt {d \tan (e+f x)}}{3 d \sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 310 vs. \(2 (88 ) = 176\).
time = 0.12, size = 311, normalized size = 2.91
method | result | size |
derivativedivides | \(\frac {2 a^{3} \left (-\frac {i \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-3 d \sqrt {d \tan \left (f x +e \right )}+4 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(311\) |
default | \(\frac {2 a^{3} \left (-\frac {i \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-3 d \sqrt {d \tan \left (f x +e \right )}+4 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f \,d^{2}}\) | \(311\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 208 vs. \(2 (91) = 182\).
time = 0.56, size = 208, normalized size = 1.94 \begin {gather*} \frac {3 \, a^{3} d {\left (\frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} + \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} + \frac {2 \, {\left (-i \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{3} - 9 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d\right )}}{d}}{3 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 340 vs. \(2 (91) = 182\).
time = 0.37, size = 340, normalized size = 3.18 \begin {gather*} \frac {3 \, \sqrt {-\frac {64 i \, a^{6}}{d f^{2}}} {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \log \left (\frac {{\left (-8 i \, a^{3} d e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {-\frac {64 i \, a^{6}}{d f^{2}}} {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a^{3}}\right ) - 3 \, \sqrt {-\frac {64 i \, a^{6}}{d f^{2}}} {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \log \left (\frac {{\left (-8 i \, a^{3} d e^{\left (2 i \, f x + 2 i \, e\right )} - \sqrt {-\frac {64 i \, a^{6}}{d f^{2}}} {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a^{3}}\right ) - 16 \, {\left (5 \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 \, a^{3}\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{12 \, {\left (d f e^{\left (2 i \, f x + 2 i \, e\right )} + d f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - i a^{3} \left (\int \frac {i}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \left (- \frac {3 \tan {\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\right )\, dx + \int \frac {\tan ^{3}{\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \left (- \frac {3 i \tan ^{2}{\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.62, size = 130, normalized size = 1.21 \begin {gather*} \frac {8 i \, \sqrt {2} a^{3} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{\sqrt {d} f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} - \frac {2 \, {\left (i \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{5} f^{2} \tan \left (f x + e\right ) + 9 \, \sqrt {d \tan \left (f x + e\right )} a^{3} d^{5} f^{2}\right )}}{3 \, d^{6} f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.38, size = 81, normalized size = 0.76 \begin {gather*} -\frac {6\,a^3\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{d\,f}-\frac {a^3\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}\,2{}\mathrm {i}}{3\,d^2\,f}+\frac {\sqrt {16{}\mathrm {i}}\,a^3\,\mathrm {atan}\left (\frac {\sqrt {16{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{4\,\sqrt {-d}}\right )\,2{}\mathrm {i}}{\sqrt {-d}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________